package ads.pin.pinmon.scenes;

import ads.pin.pinmon.entity.Player;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class PlayerScene extends Scene {

	private String m_playerName;

	public PlayerScene(Game game) {
		this.m_game = game;
		this.m_spriteBatch = new SpriteBatch();

	}

	@Override
	public void update(float deltaTime) {

		if (Gdx.input.isKeyPressed(Input.Keys.ENTER)) {
			// TODO validate player name and add other stuff.
			Player player = new Player(120, 120, 120, 120);
			player.setName(m_playerName);
			m_game.setScreen(new PinmonScene(m_game, player));

		} else if (Gdx.input.isKeyPressed(Input.Keys.ESCAPE)) {
			m_game.setScreen(new StartScene(m_game));
		}

	}

	@Override
	public void draw(float deltaTime) {
		// TODO Auto-generated method stub

	}

}
